package com.cykj.controller;

import com.cykj.service.CommentService;
import com.cykj.util.ResponseDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/comment")
public class CommentController {
    @Autowired
    private CommentService commentService;
    @RequestMapping("/getComments")
    public ResponseDto getComments(int pageCurr, int pageSize,int foodsId,int scenicId){
        return commentService.getComments(pageCurr, pageSize, foodsId, scenicId);
    }
    @RequestMapping("/upComment")
    public ResponseDto upComment(String userName, String value, String foodsId, int scenicId) {
        return commentService.upComment(userName, value, foodsId, scenicId);
    }
}
